﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Root.master" AutoEventWireup="true" CodeFile="oborot.aspx.cs" Inherits="Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
    <div class="pageLabel">
        <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Оборотная ведомость" Font-Size="Medium" Theme="iOS">
        </dx:ASPxLabel>
    </div>
    <div style="margin-left: 10px; margin-bottom: auto;">
        <div>
            <table style="margin-left: -2px">
                <tr>
                    <td>
                        <dx:ASPxDateEdit ID="dt1" runat="server" Width="80px"></dx:ASPxDateEdit>
                    </td>
                    <td>
                        <dx:ASPxDateEdit ID="dt2" runat="server" Width="80px"></dx:ASPxDateEdit>
                    </td>
                    <td>
                        <dx:ASPxButton ID="btn_Exec" runat="server" Text="Обновить" Theme="DevEx"></dx:ASPxButton>
                    </td>
                </tr>
            </table>
        </div>

        <dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" DataSourceID="ds_vzoborot" Theme="DevEx">
            <Columns>
                <dx:GridViewDataTextColumn FieldName="KONTRAGENT" VisibleIndex="0" Visible="False">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="KONTRAGENTNAME" VisibleIndex="1" Caption="Организация" Width="150px">
                    <DataItemTemplate>
                        <a href="revise.aspx?vcod=<%# Eval("KONTRAGENT") %>" target="_blank"><%# Eval("KONTRAGENTNAME") %></a>
                    </DataItemTemplate>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="STARTOST" VisibleIndex="2" Caption="Нач. остаток">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="NACH" VisibleIndex="3" Caption="Начисления">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="OPL" VisibleIndex="4" Caption="Оплаты">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="ENDOST" VisibleIndex="5" Caption="Кон. остаток">
                    <PropertiesTextEdit DisplayFormatString="F">
                    </PropertiesTextEdit>
                </dx:GridViewDataTextColumn>
            </Columns>
            <SettingsBehavior AllowSort="False" />
        </dx:ASPxGridView>
    </div>
    <asp:SqlDataSource ID="ds_vzoborot" runat="server" ConnectionString="<%$ ConnectionStrings:RegRar %>" ProviderName="<%$ ConnectionStrings:RegRar.ProviderName %>" SelectCommand="MAKEOBOROT" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="dt1" DbType="Date" Name="D1" PropertyName="Value" />
            <asp:ControlParameter ControlID="dt2" DbType="Date" Name="D2" PropertyName="Value" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

